
#import "UIView+NEDFrame.h"

@implementation UIView (NEDFrame)

@dynamic ned_maxX,ned_maxY,ned_minY;

-(void)setNed_origin:(CGPoint)origin
{
    CGRect frame = self.frame;
    frame.origin = origin;
    self.frame = frame;
}

-(CGPoint)ned_origin
{
    return self.frame.origin;
}

-(void)setNed_size:(CGSize)size
{
    CGRect frame = self.frame;
    frame.size = size;
    self.frame = frame;
}

-(CGSize)ned_size
{
    return self.frame.size;
}

-(void)setNed_x:(CGFloat)x
{
    CGRect frame = self.frame;
    frame.origin.x = x;
    self.frame = frame;
}

-(CGFloat)ned_x
{
    return self.frame.origin.x;
}

-(void)setNed_y:(CGFloat)y
{
    CGRect frame = self.frame;
    frame.origin.y = y;
    self.frame = frame;
}

-(CGFloat)ned_y
{
    return self.frame.origin.y;
}

-(void)setNed_width:(CGFloat)width
{
    CGRect frame = self.frame;
    frame.size.width = width;
    self.frame = frame;
}

-(CGFloat)ned_width
{
    return self.frame.size.width;
}

-(void)setNed_height:(CGFloat)height
{
    CGRect frame = self.frame;
    frame.size.height = height;
    self.frame = frame;
}

-(CGFloat)ned_height
{
    return self.frame.size.height;
}

-(void)setNed_centerX:(CGFloat)centerX
{
    CGPoint center = self.center;
    center.x = centerX;
    self.center = center;
}

-(CGFloat)ned_centerX
{
    return self.center.x;
}

-(void)setNed_centerY:(CGFloat)centerY
{
    CGPoint center = self.center;
    center.y = centerY;
    self.center = center;
}

-(CGFloat)ned_centerY
{
    return self.center.y;
}

-(CGFloat)ned_maxY{
    return CGRectGetMaxY(self.frame);
}

-(CGFloat)ned_minY{
    return CGRectGetMinY(self.frame);
}

-(CGFloat)ned_maxX{
    return CGRectGetMaxX(self.frame);
}

- (CGFloat)ned_minX{
    return CGRectGetMinX(self.frame);
}



@end
